<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>至简医考</title>
  </head>
  <body>
    <div id="app"></div>
    <div id="text"></div>
    <!-- built files will be auto injected -->

    <button>
      <a id="btn" href="https://mobile.baidu.com/item?docid=24959738&source=aladdin%40wise_app_13%40button&ala=wise_app%40strong%40%E7%81%AB%E7%8B%90%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85&from=1020539m">

      </a>
    </button>
  </body>
  <script>
    function IEVersion() {
      var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
      var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
      var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
      var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
      if(isIE) {
        var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
        reIE.test(userAgent);
        var fIEVersion = parseFloat(RegExp["$1"]);
        if(fIEVersion == 7) {
          return false;
        } else if(fIEVersion == 8) {
          return false;
        } else if(fIEVersion == 9) {
          return false;
        } else if(fIEVersion == 10) {
          return false;
        } else {
          return false;//IE版本<=7
        }
      } else if(isEdge) {
        return true;//edge
      } else if(isIE11) {
        return true; //IE11
      }else{
        return true;//不是ie浏览器
      }
    }
    function isFirefox () {
      if (navigator.userAgent.indexOf('Firefox') >= 0) {
        return true
      } else {
        return false
      }

    }

    if (!IEVersion()) {
      location.href = 'http://58.16.67.117:4005/fuckIE.html'
    }
    document.oncontextmenu = function(){//禁止鼠标右键
      event.returnValue = false;
    }
    document.oncontextmenu = function(){return false;};
    var ua = navigator.userAgent;

    var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),

      isIphone =!ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),

      isAndroid = ua.match(/(Android)\s+([\d.]+)/),

      isMobile = isIphone || isAndroid;

    //判断
    var pc = document.getElementById("app");
    var phone = document.getElementById("text");
    if(isMobile){
      if(!isFirefox ()){
        pc.style.display = 'none'
        document.getElementById("text").innerHTML="手机请下载火狐浏览器观看视频"
        document.getElementById("btn").innerHTML="点击下载"
      }else {
        phone.style.display = 'none'
      }
    }else {
      phone.style.display = 'none'
    }
  </script>
</html>
